//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS KinesisAnalyticsV2 service.
///
///  Amazon Managed Service for Apache Flink was previously known as Amazon Kinesis Data Analytics for Apache Flink.  Amazon Managed Service for Apache Flink is a fully managed service that you can use to process and analyze streaming data using Java, Python, SQL, or Scala. The service enables you to quickly author and run Java, SQL, or Scala code against streaming sources to perform time series analytics, feed real-time dashboards, and create real-time metrics.
public struct KinesisAnalyticsV2: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the KinesisAnalyticsV2 client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            amzTarget: "KinesisAnalytics_20180523",
            serviceName: "KinesisAnalyticsV2",
            serviceIdentifier: "kinesisanalytics",
            serviceProtocol: .json(version: "1.1"),
            apiVersion: "2018-05-23",
            endpoint: endpoint,
            variantEndpoints: Self.variantEndpoints,
            errorType: KinesisAnalyticsV2ErrorType.self,
            xmlNamespace: "http://analytics.kinesis.amazonaws.com/doc/2018-05-23",
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }




    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.fips]: .init(endpoints: [
            "ca-central-1": "kinesisanalytics-fips.ca-central-1.amazonaws.com",
            "ca-west-1": "kinesisanalytics-fips.ca-west-1.amazonaws.com",
            "us-east-1": "kinesisanalytics-fips.us-east-1.amazonaws.com",
            "us-east-2": "kinesisanalytics-fips.us-east-2.amazonaws.com",
            "us-gov-east-1": "kinesisanalytics-fips.us-gov-east-1.amazonaws.com",
            "us-gov-west-1": "kinesisanalytics-fips.us-gov-west-1.amazonaws.com",
            "us-west-1": "kinesisanalytics-fips.us-west-1.amazonaws.com",
            "us-west-2": "kinesisanalytics-fips.us-west-2.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Adds an Amazon CloudWatch log stream to monitor application configuration errors.
    @Sendable
    @inlinable
    public func addApplicationCloudWatchLoggingOption(_ input: AddApplicationCloudWatchLoggingOptionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AddApplicationCloudWatchLoggingOptionResponse {
        try await self.client.execute(
            operation: "AddApplicationCloudWatchLoggingOption", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds an Amazon CloudWatch log stream to monitor application configuration errors.
    ///
    /// Parameters:
    ///   - applicationName: The Kinesis Data Analytics application name.
    ///   - cloudWatchLoggingOption: Provides the Amazon CloudWatch log stream Amazon Resource Name (ARN).
    ///   - conditionalToken: A value you use to implement strong concurrency for application updates. You must provide the CurrentApplicationVersionId or the ConditionalToken. You get the application's current ConditionalToken using DescribeApplication. For better concurrency support, use the ConditionalToken parameter instead of CurrentApplicationVersionId.
    ///   - currentApplicationVersionId: The version ID of the SQL-based Kinesis Data Analytics application. You must provide the CurrentApplicationVersionId or the ConditionalToken.You can retrieve the application version ID using DescribeApplication. For better concurrency support, use the ConditionalToken parameter instead of CurrentApplicationVersionId.
    ///   - logger: Logger use during operation
    @inlinable
    public func addApplicationCloudWatchLoggingOption(
        applicationName: String,
        cloudWatchLoggingOption: CloudWatchLoggingOption,
        conditionalToken: String? = nil,
        currentApplicationVersionId: Int64? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> AddApplicationCloudWatchLoggingOptionResponse {
        let input = AddApplicationCloudWatchLoggingOptionRequest(
            applicationName: applicationName, 
            cloudWatchLoggingOption: cloudWatchLoggingOption, 
            conditionalToken: conditionalToken, 
            currentApplicationVersionId: currentApplicationVersionId
        )
        return try await self.addApplicationCloudWatchLoggingOption(input, logger: logger)
    }

    ///  Adds a streaming source to your SQL-based Kinesis Data Analytics application.   You can add a streaming source when you create an application, or you can use this operation to add a streaming source after you create an application. For more information, see CreateApplication. Any configuration update, including adding a streaming source using this operation,   results in a new version of the application. You can use the DescribeApplication operation   to find the current application version.
    @Sendable
    @inlinable
    public func addApplicationInput(_ input: AddApplicationInputRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AddApplicationInputResponse {
        try await self.client.execute(
            operation: "AddApplicationInput", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Adds a streaming source to your SQL-based Kinesis Data Analytics application.   You can add a streaming source when you create an application, or you can use this operation to add a streaming source after you create an application. For more information, see CreateApplication. Any configuration update, including adding a streaming source using this operation,   results in a new version of the application. You can use the DescribeApplication operation   to find the current application version.
    ///
    /// Parameters:
    ///   - applicationName: The name of your existing application to which you want to add the streaming source.
    ///   - currentApplicationVersionId: The current version of your application.  You must provide the ApplicationVersionID or the ConditionalToken.You can use the DescribeApplication operation to find the current application version.
    ///   - input: The Input to add.
    ///   - logger: Logger use during operation
    @inlinable
    public func addApplicationInput(
        applicationName: String,
        currentApplicationVersionId: Int64,
        input: Input,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> AddApplicationInputResponse {
        let input = AddApplicationInputRequest(
            applicationName: applicationName, 
            currentApplicationVersionId: currentApplicationVersionId, 
            input: input
        )
        return try await self.addApplicationInput(input, logger: logger)
    }

    /// Adds an InputProcessingConfiguration to a SQL-based Kinesis Data Analytics application. An input processor pre-processes records  on the input stream before the application's SQL code executes. Currently, the only input processor available is Amazon Lambda.
    @Sendable
    @inlinable
    public func addApplicationInputProcessingConfiguration(_ input: AddApplicationInputProcessingConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AddApplicationInputProcessingConfigurationResponse {
        try await self.client.execute(
            operation: "AddApplicationInputProcessingConfiguration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds an InputProcessingConfiguration to a SQL-based Kinesis Data Analytics application. An input processor pre-processes records  on the input stream before the application's SQL code executes. Currently, the only input processor available is Amazon Lambda.
    ///
    /// Parameters:
    ///   - applicationName: The name of the application to which you want to add the input processing configuration.
    ///   - currentApplicationVersionId: The version of the application to which you want to add the input processing configuration. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.
    ///   - inputId: The ID of the input configuration to add the input processing configuration to. You can get a list of the input IDs for an application using the DescribeApplication operation.
    ///   - inputProcessingConfiguration: The InputProcessingConfiguration to add to the application.
    ///   - logger: Logger use during operation
    @inlinable
    public func addApplicationInputProcessingConfiguration(
        applicationName: String,
        currentApplicationVersionId: Int64,
        inputId: String,
        inputProcessingConfiguration: InputProcessingConfiguration,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> AddApplicationInputProcessingConfigurationResponse {
        let input = AddApplicationInputProcessingConfigurationRequest(
            applicationName: applicationName, 
            currentApplicationVersionId: currentApplicationVersionId, 
            inputId: inputId, 
            inputProcessingConfiguration: inputProcessingConfiguration
        )
        return try await self.addApplicationInputProcessingConfiguration(input, logger: logger)
    }

    /// Adds an external destination to your SQL-based Kinesis Data Analytics application. If you want Kinesis Data Analytics to deliver data from an in-application stream within your application to an external destination (such as an Kinesis data stream, a Kinesis Data Firehose delivery stream, or an Amazon Lambda function), you add the relevant configuration to your application using this operation. You can configure one or more outputs for your application. Each output configuration maps an in-application stream and an external destination. You can use one of the output configurations to deliver data from your in-application error stream to an external destination so that you can analyze the errors.   Any configuration update, including adding a streaming source using this operation, results in a new version of the application. You can use the DescribeApplication operation to find the current application version.
    @Sendable
    @inlinable
    public func addApplicationOutput(_ input: AddApplicationOutputRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AddApplicationOutputResponse {
        try await self.client.execute(
            operation: "AddApplicationOutput", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds an external destination to your SQL-based Kinesis Data Analytics application. If you want Kinesis Data Analytics to deliver data from an in-application stream within your application to an external destination (such as an Kinesis data stream, a Kinesis Data Firehose delivery stream, or an Amazon Lambda function), you add the relevant configuration to your application using this operation. You can configure one or more outputs for your application. Each output configuration maps an in-application stream and an external destination. You can use one of the output configurations to deliver data from your in-application error stream to an external destination so that you can analyze the errors.   Any configuration update, including adding a streaming source using this operation, results in a new version of the application. You can use the DescribeApplication operation to find the current application version.
    ///
    /// Parameters:
    ///   - applicationName: The name of the application to which you want to add the output configuration.
    ///   - currentApplicationVersionId: The version of the application to which you want to add the output configuration. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.
    ///   - output: An array of objects, each describing one output configuration. In the output configuration, you specify the name of an in-application stream, a destination (that is, a Kinesis data stream, a Kinesis Data Firehose delivery stream, or an Amazon Lambda function), and record the formation to use when writing to the destination.
    ///   - logger: Logger use during operation
    @inlinable
    public func addApplicationOutput(
        applicationName: String,
        currentApplicationVersionId: Int64,
        output: Output,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> AddApplicationOutputResponse {
        let input = AddApplicationOutputRequest(
            applicationName: applicationName, 
            currentApplicationVersionId: currentApplicationVersionId, 
            output: output
        )
        return try await self.addApplicationOutput(input, logger: logger)
    }

    /// Adds a reference data source to an existing SQL-based Kinesis Data Analytics application. Kinesis Data Analytics reads reference data (that is, an Amazon S3 object) and creates an in-application table within your application. In the request, you provide the source (S3 bucket name and object key name), name of the in-application table to create, and the necessary mapping information that describes how data in an Amazon S3 object maps to columns in the resulting in-application table.
    @Sendable
    @inlinable
    public func addApplicationReferenceDataSource(_ input: AddApplicationReferenceDataSourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AddApplicationReferenceDataSourceResponse {
        try await self.client.execute(
            operation: "AddApplicationReferenceDataSource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a reference data source to an existing SQL-based Kinesis Data Analytics application. Kinesis Data Analytics reads reference data (that is, an Amazon S3 object) and creates an in-application table within your application. In the request, you provide the source (S3 bucket name and object key name), name of the in-application table to create, and the necessary mapping information that describes how data in an Amazon S3 object maps to columns in the resulting in-application table.
    ///
    /// Parameters:
    ///   - applicationName: The name of an existing application.
    ///   - currentApplicationVersionId: The version of the application for which you are adding the reference data source.  You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.
    ///   - referenceDataSource: The reference data source can be an object in your Amazon S3 bucket. Kinesis Data Analytics reads the object and copies the data into the in-application table that is created. You provide an S3 bucket, object key name, and the resulting  in-application table that is  created.
    ///   - logger: Logger use during operation
    @inlinable
    public func addApplicationReferenceDataSource(
        applicationName: String,
        currentApplicationVersionId: Int64,
        referenceDataSource: ReferenceDataSource,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> AddApplicationReferenceDataSourceResponse {
        let input = AddApplicationReferenceDataSourceRequest(
            applicationName: applicationName, 
            currentApplicationVersionId: currentApplicationVersionId, 
            referenceDataSource: referenceDataSource
        )
        return try await self.addApplicationReferenceDataSource(input, logger: logger)
    }

    /// Adds a Virtual Private Cloud (VPC) configuration to the application. Applications can use VPCs to store  and access resources securely. Note the following about VPC configurations for Managed Service for Apache Flink applications:   VPC configurations are not supported for SQL applications.   When a VPC is added to a Managed Service for Apache Flink application, the application can no longer be accessed from the  Internet directly. To enable Internet access to the application, add an Internet gateway to your VPC.
    @Sendable
    @inlinable
    public func addApplicationVpcConfiguration(_ input: AddApplicationVpcConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AddApplicationVpcConfigurationResponse {
        try await self.client.execute(
            operation: "AddApplicationVpcConfiguration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a Virtual Private Cloud (VPC) configuration to the application. Applications can use VPCs to store  and access resources securely. Note the following about VPC configurations for Managed Service for Apache Flink applications:   VPC configurations are not supported for SQL applications.   When a VPC is added to a Managed Service for Apache Flink application, the application can no longer be accessed from the  Internet directly. To enable Internet access to the application, add an Internet gateway to your VPC.
    ///
    /// Parameters:
    ///   - applicationName: The name of an existing application.
    ///   - conditionalToken: A value you use to implement strong concurrency for application updates. You must provide the ApplicationVersionID or the ConditionalToken. You get the application's current ConditionalToken using DescribeApplication. For better concurrency support, use the ConditionalToken parameter instead of CurrentApplicationVersionId.
    ///   - currentApplicationVersionId: The version of the application to which you want to add the VPC configuration. You must provide the CurrentApplicationVersionId or the ConditionalToken. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned. For better concurrency support, use the ConditionalToken parameter instead of CurrentApplicationVersionId.
    ///   - vpcConfiguration: Description of the VPC to add to the application.
    ///   - logger: Logger use during operation
    @inlinable
    public func addApplicationVpcConfiguration(
        applicationName: String,
        conditionalToken: String? = nil,
        currentApplicationVersionId: Int64? = nil,
        vpcConfiguration: VpcConfiguration,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> AddApplicationVpcConfigurationResponse {
        let input = AddApplicationVpcConfigurationRequest(
            applicationName: applicationName, 
            conditionalToken: conditionalToken, 
            currentApplicationVersionId: currentApplicationVersionId, 
            vpcConfiguration: vpcConfiguration
        )
        return try await self.addApplicationVpcConfiguration(input, logger: logger)
    }

    /// Creates a Managed Service for Apache Flink application. For information about creating a Managed Service for Apache Flink application, see Creating an Application.
    @Sendable
    @inlinable
    public func createApplication(_ input: CreateApplicationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateApplicationResponse {
        try await self.client.execute(
            operation: "CreateApplication", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a Managed Service for Apache Flink application. For information about creating a Managed Service for Apache Flink application, see Creating an Application.
    ///
    /// Parameters:
    ///   - applicationConfiguration: Use this parameter to configure the application.
    ///   - applicationDescription: A summary description of the application.
    ///   - applicationMode: Use the STREAMING mode to create a Managed Service for Apache Flink application. To create a Managed Service for Apache Flink Studio notebook, use the  INTERACTIVE mode.
    ///   - applicationName: The name of your application (for example, sample-app).
    ///   - cloudWatchLoggingOptions: Use this parameter to configure an Amazon CloudWatch log stream to monitor application configuration errors.
    ///   - runtimeEnvironment: The runtime environment for the application.
    ///   - serviceExecutionRole: The IAM role used by the application to access Kinesis data streams, Kinesis Data Firehose delivery streams, Amazon S3 objects, and other external resources.
    ///   - tags: A list of one or more tags to assign to the application. A tag is a key-value pair that identifies an  application. Note that the maximum number of application tags includes system tags. The maximum number of  user-defined application tags is 50. For more information, see  Using Tagging.
    ///   - logger: Logger use during operation
    @inlinable
    public func createApplication(
        applicationConfiguration: ApplicationConfiguration? = nil,
        applicationDescription: String? = nil,
        applicationMode: ApplicationMode? = nil,
        applicationName: String,
        cloudWatchLoggingOptions: [CloudWatchLoggingOption]? = nil,
        runtimeEnvironment: RuntimeEnvironment,
        serviceExecutionRole: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateApplicationResponse {
        let input = CreateApplicationRequest(
            applicationConfiguration: applicationConfiguration, 
            applicationDescription: applicationDescription, 
            applicationMode: applicationMode, 
            applicationName: applicationName, 
            cloudWatchLoggingOptions: cloudWatchLoggingOptions, 
            runtimeEnvironment: runtimeEnvironment, 
            serviceExecutionRole: serviceExecutionRole, 
            tags: tags
        )
        return try await self.createApplication(input, logger: logger)
    }

    /// Creates and returns a URL that you can use to connect to  an application's extension. The IAM role or user used to call this API defines the permissions to access the extension. After the presigned URL is created, no additional permission is required to access this URL. IAM authorization policies for this API are also enforced for every HTTP request that attempts to connect to the extension.  You    control the amount of time that the URL will be valid using the SessionExpirationDurationInSeconds parameter. If you do not provide this parameter, the returned URL is valid for twelve hours.  The URL that you get from a call to CreateApplicationPresignedUrl must be used within 3 minutes to be valid.  If you first try to use the URL after the 3-minute limit expires, the service returns an HTTP 403 Forbidden error.
    @Sendable
    @inlinable
    public func createApplicationPresignedUrl(_ input: CreateApplicationPresignedUrlRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateApplicationPresignedUrlResponse {
        try await self.client.execute(
            operation: "CreateApplicationPresignedUrl", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates and returns a URL that you can use to connect to  an application's extension. The IAM role or user used to call this API defines the permissions to access the extension. After the presigned URL is created, no additional permission is required to access this URL. IAM authorization policies for this API are also enforced for every HTTP request that attempts to connect to the extension.  You    control the amount of time that the URL will be valid using the SessionExpirationDurationInSeconds parameter. If you do not provide this parameter, the returned URL is valid for twelve hours.  The URL that you get from a call to CreateApplicationPresignedUrl must be used within 3 minutes to be valid.  If you first try to use the URL after the 3-minute limit expires, the service returns an HTTP 403 Forbidden error.
    ///
    /// Parameters:
    ///   - applicationName: The name of the application.
    ///   - sessionExpirationDurationInSeconds: The duration in seconds for which the returned URL will be valid.
    ///   - urlType: The type of the extension for which to create and return a URL. Currently, the only valid extension URL type is FLINK_DASHBOARD_URL.
    ///   - logger: Logger use during operation
    @inlinable
    public func createApplicationPresignedUrl(
        applicationName: String,
        sessionExpirationDurationInSeconds: Int64? = nil,
        urlType: UrlType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateApplicationPresignedUrlResponse {
        let input = CreateApplicationPresignedUrlRequest(
            applicationName: applicationName, 
            sessionExpirationDurationInSeconds: sessionExpirationDurationInSeconds, 
            urlType: urlType
        )
        return try await self.createApplicationPresignedUrl(input, logger: logger)
    }

    /// Creates a snapshot of the application's state data.
    @Sendable
    @inlinable
    public func createApplicationSnapshot(_ input: CreateApplicationSnapshotRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateApplicationSnapshotResponse {
        try await self.client.execute(
            operation: "CreateApplicationSnapshot", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a snapshot of the application's state data.
    ///
    /// Parameters:
    ///   - applicationName: The name of an existing application
    ///   - snapshotName: An identifier for the application snapshot.
    ///   - logger: Logger use during operation
    @inlinable
    public func createApplicationSnapshot(
        applicationName: String,
        snapshotName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateApplicationSnapshotResponse {
        let input = CreateApplicationSnapshotRequest(
            applicationName: applicationName, 
            snapshotName: snapshotName
        )
        return try await self.createApplicationSnapshot(input, logger: logger)
    }

    /// Deletes the specified application. Managed Service for Apache Flink halts application execution and deletes the application.
    @Sendable
    @inlinable
    public func deleteApplication(_ input: DeleteApplicationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteApplicationResponse {
        try await self.client.execute(
            operation: "DeleteApplication", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the specified application. Managed Service for Apache Flink halts application execution and deletes the application.
    ///
    /// Parameters:
    ///   - applicationName: The name of the application to delete.
    ///   - createTimestamp: Use the DescribeApplication operation to get this value.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteApplication(
        applicationName: String,
        createTimestamp: Date,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteApplicationResponse {
        let input = DeleteApplicationRequest(
            applicationName: applicationName, 
            createTimestamp: createTimestamp
        )
        return try await self.deleteApplication(input, logger: logger)
    }

    /// Deletes an Amazon CloudWatch log stream from an SQL-based Kinesis Data Analytics application.
    @Sendable
    @inlinable
    public func deleteApplicationCloudWatchLoggingOption(_ input: DeleteApplicationCloudWatchLoggingOptionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteApplicationCloudWatchLoggingOptionResponse {
        try await self.client.execute(
            operation: "DeleteApplicationCloudWatchLoggingOption", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an Amazon CloudWatch log stream from an SQL-based Kinesis Data Analytics application.
    ///
    /// Parameters:
    ///   - applicationName: The application name.
    ///   - cloudWatchLoggingOptionId: The CloudWatchLoggingOptionId of the Amazon CloudWatch logging option to delete. You can get the CloudWatchLoggingOptionId by using the DescribeApplication operation.
    ///   - conditionalToken: A value you use to implement strong concurrency for application updates. You must provide the CurrentApplicationVersionId or the ConditionalToken. You get the application's current ConditionalToken using DescribeApplication. For better concurrency support, use the ConditionalToken parameter instead of CurrentApplicationVersionId.
    ///   - currentApplicationVersionId: The version ID of the application. You must provide the CurrentApplicationVersionId or the ConditionalToken. You can retrieve the application version ID using DescribeApplication. For better concurrency support, use the ConditionalToken parameter instead of CurrentApplicationVersionId.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteApplicationCloudWatchLoggingOption(
        applicationName: String,
        cloudWatchLoggingOptionId: String,
        conditionalToken: String? = nil,
        currentApplicationVersionId: Int64? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteApplicationCloudWatchLoggingOptionResponse {
        let input = DeleteApplicationCloudWatchLoggingOptionRequest(
            applicationName: applicationName, 
            cloudWatchLoggingOptionId: cloudWatchLoggingOptionId, 
            conditionalToken: conditionalToken, 
            currentApplicationVersionId: currentApplicationVersionId
        )
        return try await self.deleteApplicationCloudWatchLoggingOption(input, logger: logger)
    }

    /// Deletes an InputProcessingConfiguration from an input.
    @Sendable
    @inlinable
    public func deleteApplicationInputProcessingConfiguration(_ input: DeleteApplicationInputProcessingConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteApplicationInputProcessingConfigurationResponse {
        try await self.client.execute(
            operation: "DeleteApplicationInputProcessingConfiguration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an InputProcessingConfiguration from an input.
    ///
    /// Parameters:
    ///   - applicationName: The name of the application.
    ///   - currentApplicationVersionId: The application version.  You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the  ConcurrentModificationException is returned.
    ///   - inputId: The ID of the input configuration from which to delete the input processing configuration. You can get a list of the input IDs for an application by using the DescribeApplication operation.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteApplicationInputProcessingConfiguration(
        applicationName: String,
        currentApplicationVersionId: Int64,
        inputId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteApplicationInputProcessingConfigurationResponse {
        let input = DeleteApplicationInputProcessingConfigurationRequest(
            applicationName: applicationName, 
            currentApplicationVersionId: currentApplicationVersionId, 
            inputId: inputId
        )
        return try await self.deleteApplicationInputProcessingConfiguration(input, logger: logger)
    }

    /// Deletes the output destination configuration from your SQL-based Kinesis Data Analytics application's configuration.  Kinesis Data Analytics will no longer write data from the corresponding in-application stream to the external output destination.
    @Sendable
    @inlinable
    public func deleteApplicationOutput(_ input: DeleteApplicationOutputRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteApplicationOutputResponse {
        try await self.client.execute(
            operation: "DeleteApplicationOutput", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the output destination configuration from your SQL-based Kinesis Data Analytics application's configuration.  Kinesis Data Analytics will no longer write data from the corresponding in-application stream to the external output destination.
    ///
    /// Parameters:
    ///   - applicationName: The application name.
    ///   - currentApplicationVersionId: The application version.  You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the  ConcurrentModificationException is returned.
    ///   - outputId: The ID of the configuration to delete. Each output configuration that is added to the application (either when the application is created or later) using the AddApplicationOutput operation has a unique ID. You need to provide the ID to uniquely identify the output configuration that you want to delete from the application configuration. You can use the DescribeApplication operation to get the specific OutputId.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteApplicationOutput(
        applicationName: String,
        currentApplicationVersionId: Int64,
        outputId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteApplicationOutputResponse {
        let input = DeleteApplicationOutputRequest(
            applicationName: applicationName, 
            currentApplicationVersionId: currentApplicationVersionId, 
            outputId: outputId
        )
        return try await self.deleteApplicationOutput(input, logger: logger)
    }

    /// Deletes a reference data source configuration from the specified SQL-based Kinesis Data Analytics application's configuration. If the application is running, Kinesis Data Analytics immediately removes the in-application table that you created using the AddApplicationReferenceDataSource operation.
    @Sendable
    @inlinable
    public func deleteApplicationReferenceDataSource(_ input: DeleteApplicationReferenceDataSourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteApplicationReferenceDataSourceResponse {
        try await self.client.execute(
            operation: "DeleteApplicationReferenceDataSource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a reference data source configuration from the specified SQL-based Kinesis Data Analytics application's configuration. If the application is running, Kinesis Data Analytics immediately removes the in-application table that you created using the AddApplicationReferenceDataSource operation.
    ///
    /// Parameters:
    ///   - applicationName: The name of an existing application.
    ///   - currentApplicationVersionId: The current application version.   You can use the DescribeApplication operation to get the current application version. If the version specified  is not the current version, the ConcurrentModificationException is returned.
    ///   - referenceId: The ID of the reference data source. When you add a reference data source to your application using the AddApplicationReferenceDataSource, Kinesis Data Analytics assigns an ID. You can use the DescribeApplication operation to get the reference ID.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteApplicationReferenceDataSource(
        applicationName: String,
        currentApplicationVersionId: Int64,
        referenceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteApplicationReferenceDataSourceResponse {
        let input = DeleteApplicationReferenceDataSourceRequest(
            applicationName: applicationName, 
            currentApplicationVersionId: currentApplicationVersionId, 
            referenceId: referenceId
        )
        return try await self.deleteApplicationReferenceDataSource(input, logger: logger)
    }

    /// Deletes a snapshot of application state.
    @Sendable
    @inlinable
    public func deleteApplicationSnapshot(_ input: DeleteApplicationSnapshotRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteApplicationSnapshotResponse {
        try await self.client.execute(
            operation: "DeleteApplicationSnapshot", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a snapshot of application state.
    ///
    /// Parameters:
    ///   - applicationName: The name of an existing application.
    ///   - snapshotCreationTimestamp: The creation timestamp of the application snapshot to delete. You can retrieve this value  using  or .
    ///   - snapshotName: The identifier for the snapshot delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteApplicationSnapshot(
        applicationName: String,
        snapshotCreationTimestamp: Date,
        snapshotName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteApplicationSnapshotResponse {
        let input = DeleteApplicationSnapshotRequest(
            applicationName: applicationName, 
            snapshotCreationTimestamp: snapshotCreationTimestamp, 
            snapshotName: snapshotName
        )
        return try await self.deleteApplicationSnapshot(input, logger: logger)
    }

    /// Removes a VPC configuration from a Managed Service for Apache Flink application.
    @Sendable
    @inlinable
    public func deleteApplicationVpcConfiguration(_ input: DeleteApplicationVpcConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteApplicationVpcConfigurationResponse {
        try await self.client.execute(
            operation: "DeleteApplicationVpcConfiguration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes a VPC configuration from a Managed Service for Apache Flink application.
    ///
    /// Parameters:
    ///   - applicationName: The name of an existing application.
    ///   - conditionalToken: A value you use to implement strong concurrency for application updates. You must provide the CurrentApplicationVersionId or the ConditionalToken. You get the application's current ConditionalToken using DescribeApplication. For better concurrency support, use the ConditionalToken parameter instead of CurrentApplicationVersionId.
    ///   - currentApplicationVersionId: The current application version ID. You must provide the CurrentApplicationVersionId or the ConditionalToken. You can retrieve the application version ID using DescribeApplication. For better concurrency support, use the ConditionalToken parameter instead of CurrentApplicationVersionId.
    ///   - vpcConfigurationId: The ID of the VPC configuration to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteApplicationVpcConfiguration(
        applicationName: String,
        conditionalToken: String? = nil,
        currentApplicationVersionId: Int64? = nil,
        vpcConfigurationId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteApplicationVpcConfigurationResponse {
        let input = DeleteApplicationVpcConfigurationRequest(
            applicationName: applicationName, 
            conditionalToken: conditionalToken, 
            currentApplicationVersionId: currentApplicationVersionId, 
            vpcConfigurationId: vpcConfigurationId
        )
        return try await self.deleteApplicationVpcConfiguration(input, logger: logger)
    }

    /// Returns information about a specific Managed Service for Apache Flink application. If you want to retrieve a list of all applications in your account, use the ListApplications operation.
    @Sendable
    @inlinable
    public func describeApplication(_ input: DescribeApplicationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeApplicationResponse {
        try await self.client.execute(
            operation: "DescribeApplication", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about a specific Managed Service for Apache Flink application. If you want to retrieve a list of all applications in your account, use the ListApplications operation.
    ///
    /// Parameters:
    ///   - applicationName: The name of the application.
    ///   - includeAdditionalDetails: Displays verbose information about a Managed Service for Apache Flink application, including the application's job plan.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeApplication(
        applicationName: String,
        includeAdditionalDetails: Bool? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeApplicationResponse {
        let input = DescribeApplicationRequest(
            applicationName: applicationName, 
            includeAdditionalDetails: includeAdditionalDetails
        )
        return try await self.describeApplication(input, logger: logger)
    }

    /// Provides a detailed description of a specified application operation. To see a list of all the operations of an application, invoke the ListApplicationOperations operation.  This operation is supported only for Managed Service for Apache Flink.
    @Sendable
    @inlinable
    public func describeApplicationOperation(_ input: DescribeApplicationOperationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeApplicationOperationResponse {
        try await self.client.execute(
            operation: "DescribeApplicationOperation", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Provides a detailed description of a specified application operation. To see a list of all the operations of an application, invoke the ListApplicationOperations operation.  This operation is supported only for Managed Service for Apache Flink.
    ///
    /// Parameters:
    ///   - applicationName: 
    ///   - operationId: 
    ///   - logger: Logger use during operation
    @inlinable
    public func describeApplicationOperation(
        applicationName: String,
        operationId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeApplicationOperationResponse {
        let input = DescribeApplicationOperationRequest(
            applicationName: applicationName, 
            operationId: operationId
        )
        return try await self.describeApplicationOperation(input, logger: logger)
    }

    /// Returns information about a snapshot of application state data.
    @Sendable
    @inlinable
    public func describeApplicationSnapshot(_ input: DescribeApplicationSnapshotRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeApplicationSnapshotResponse {
        try await self.client.execute(
            operation: "DescribeApplicationSnapshot", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about a snapshot of application state data.
    ///
    /// Parameters:
    ///   - applicationName: The name of an existing application.
    ///   - snapshotName: The identifier of an application snapshot. You can retrieve this value using  .
    ///   - logger: Logger use during operation
    @inlinable
    public func describeApplicationSnapshot(
        applicationName: String,
        snapshotName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeApplicationSnapshotResponse {
        let input = DescribeApplicationSnapshotRequest(
            applicationName: applicationName, 
            snapshotName: snapshotName
        )
        return try await self.describeApplicationSnapshot(input, logger: logger)
    }

    /// Provides a detailed description of a specified version of the application. To see a list of all the versions of an application, invoke the ListApplicationVersions operation.  This operation is supported only for Managed Service for Apache Flink.
    @Sendable
    @inlinable
    public func describeApplicationVersion(_ input: DescribeApplicationVersionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeApplicationVersionResponse {
        try await self.client.execute(
            operation: "DescribeApplicationVersion", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Provides a detailed description of a specified version of the application. To see a list of all the versions of an application, invoke the ListApplicationVersions operation.  This operation is supported only for Managed Service for Apache Flink.
    ///
    /// Parameters:
    ///   - applicationName: The name of the application for which you want to get the version description.
    ///   - applicationVersionId: The ID of the application version for which you want to get the description.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeApplicationVersion(
        applicationName: String,
        applicationVersionId: Int64,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeApplicationVersionResponse {
        let input = DescribeApplicationVersionRequest(
            applicationName: applicationName, 
            applicationVersionId: applicationVersionId
        )
        return try await self.describeApplicationVersion(input, logger: logger)
    }

    /// Infers a schema for a SQL-based Kinesis Data Analytics application by evaluating sample records on the specified streaming source (Kinesis data stream or Kinesis Data Firehose delivery stream) or Amazon S3 object. In the response, the operation returns the inferred schema and also the sample records that the operation used to infer the schema. You can use the inferred schema when configuring a streaming source for your application. When you create an application using the Kinesis Data Analytics console, the console uses this operation to infer a schema and show it in the console user interface.
    @Sendable
    @inlinable
    public func discoverInputSchema(_ input: DiscoverInputSchemaRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DiscoverInputSchemaResponse {
        try await self.client.execute(
            operation: "DiscoverInputSchema", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Infers a schema for a SQL-based Kinesis Data Analytics application by evaluating sample records on the specified streaming source (Kinesis data stream or Kinesis Data Firehose delivery stream) or Amazon S3 object. In the response, the operation returns the inferred schema and also the sample records that the operation used to infer the schema. You can use the inferred schema when configuring a streaming source for your application. When you create an application using the Kinesis Data Analytics console, the console uses this operation to infer a schema and show it in the console user interface.
    ///
    /// Parameters:
    ///   - inputProcessingConfiguration: The InputProcessingConfiguration to use to preprocess the records  before discovering the schema of the records.
    ///   - inputStartingPositionConfiguration: The point at which you want Kinesis Data Analytics to start reading records from the specified streaming source for discovery purposes.
    ///   - resourceARN: The Amazon Resource Name (ARN) of the streaming source.
    ///   - s3Configuration: Specify this parameter to discover a schema from data in an Amazon S3 object.
    ///   - serviceExecutionRole: The ARN of the role that is used to access the streaming source.
    ///   - logger: Logger use during operation
    @inlinable
    public func discoverInputSchema(
        inputProcessingConfiguration: InputProcessingConfiguration? = nil,
        inputStartingPositionConfiguration: InputStartingPositionConfiguration? = nil,
        resourceARN: String? = nil,
        s3Configuration: S3Configuration? = nil,
        serviceExecutionRole: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DiscoverInputSchemaResponse {
        let input = DiscoverInputSchemaRequest(
            inputProcessingConfiguration: inputProcessingConfiguration, 
            inputStartingPositionConfiguration: inputStartingPositionConfiguration, 
            resourceARN: resourceARN, 
            s3Configuration: s3Configuration, 
            serviceExecutionRole: serviceExecutionRole
        )
        return try await self.discoverInputSchema(input, logger: logger)
    }

    /// Lists all the operations performed for the specified application such as UpdateApplication, StartApplication etc. The response also includes a summary of the operation. To get the complete description of a specific operation, invoke the DescribeApplicationOperation operation.  This operation is supported only for Managed Service for Apache Flink.
    @Sendable
    @inlinable
    public func listApplicationOperations(_ input: ListApplicationOperationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListApplicationOperationsResponse {
        try await self.client.execute(
            operation: "ListApplicationOperations", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all the operations performed for the specified application such as UpdateApplication, StartApplication etc. The response also includes a summary of the operation. To get the complete description of a specific operation, invoke the DescribeApplicationOperation operation.  This operation is supported only for Managed Service for Apache Flink.
    ///
    /// Parameters:
    ///   - applicationName: 
    ///   - limit: 
    ///   - nextToken: 
    ///   - operation: 
    ///   - operationStatus: 
    ///   - logger: Logger use during operation
    @inlinable
    public func listApplicationOperations(
        applicationName: String,
        limit: Int? = nil,
        nextToken: String? = nil,
        operation: String? = nil,
        operationStatus: OperationStatus? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListApplicationOperationsResponse {
        let input = ListApplicationOperationsRequest(
            applicationName: applicationName, 
            limit: limit, 
            nextToken: nextToken, 
            operation: operation, 
            operationStatus: operationStatus
        )
        return try await self.listApplicationOperations(input, logger: logger)
    }

    /// Lists information about the current application snapshots.
    @Sendable
    @inlinable
    public func listApplicationSnapshots(_ input: ListApplicationSnapshotsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListApplicationSnapshotsResponse {
        try await self.client.execute(
            operation: "ListApplicationSnapshots", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists information about the current application snapshots.
    ///
    /// Parameters:
    ///   - applicationName: The name of an existing application.
    ///   - limit: The maximum number of application snapshots to list.
    ///   - nextToken: Use this parameter if you receive a NextToken response in a previous request that indicates that there is more  output available. Set it to the value of the previous call's NextToken response to indicate where the output should  continue from.
    ///   - logger: Logger use during operation
    @inlinable
    public func listApplicationSnapshots(
        applicationName: String,
        limit: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListApplicationSnapshotsResponse {
        let input = ListApplicationSnapshotsRequest(
            applicationName: applicationName, 
            limit: limit, 
            nextToken: nextToken
        )
        return try await self.listApplicationSnapshots(input, logger: logger)
    }

    /// Lists all the versions for the specified application, including versions that were rolled back. The response also includes a summary of the configuration  associated with each version. To get the complete description of a specific application version, invoke the DescribeApplicationVersion operation.  This operation is supported only for Managed Service for Apache Flink.
    @Sendable
    @inlinable
    public func listApplicationVersions(_ input: ListApplicationVersionsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListApplicationVersionsResponse {
        try await self.client.execute(
            operation: "ListApplicationVersions", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all the versions for the specified application, including versions that were rolled back. The response also includes a summary of the configuration  associated with each version. To get the complete description of a specific application version, invoke the DescribeApplicationVersion operation.  This operation is supported only for Managed Service for Apache Flink.
    ///
    /// Parameters:
    ///   - applicationName: The name of the application for which you want to list all versions.
    ///   - limit: The maximum number of versions to list in this invocation of the operation.
    ///   - nextToken: If a previous invocation of this operation returned a pagination token, pass it into this value to retrieve the next set of results. For more information about pagination, see  Using the Amazon Command Line Interface's Pagination Options.
    ///   - logger: Logger use during operation
    @inlinable
    public func listApplicationVersions(
        applicationName: String,
        limit: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListApplicationVersionsResponse {
        let input = ListApplicationVersionsRequest(
            applicationName: applicationName, 
            limit: limit, 
            nextToken: nextToken
        )
        return try await self.listApplicationVersions(input, logger: logger)
    }

    /// Returns a list of Managed Service for Apache Flink applications in your account. For each application, the response includes the application name, Amazon Resource Name (ARN), and status.  If you want detailed information about a specific application, use  DescribeApplication.
    @Sendable
    @inlinable
    public func listApplications(_ input: ListApplicationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListApplicationsResponse {
        try await self.client.execute(
            operation: "ListApplications", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of Managed Service for Apache Flink applications in your account. For each application, the response includes the application name, Amazon Resource Name (ARN), and status.  If you want detailed information about a specific application, use  DescribeApplication.
    ///
    /// Parameters:
    ///   - limit: The maximum number of applications to list.
    ///   - nextToken: If a previous command returned a pagination token,  pass it into this value to retrieve the next set of results. For more information about pagination, see  Using the Amazon Command Line Interface's Pagination Options.
    ///   - logger: Logger use during operation
    @inlinable
    public func listApplications(
        limit: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListApplicationsResponse {
        let input = ListApplicationsRequest(
            limit: limit, 
            nextToken: nextToken
        )
        return try await self.listApplications(input, logger: logger)
    }

    /// Retrieves the list of key-value tags assigned to the application. For more information, see  Using Tagging.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the list of key-value tags assigned to the application. For more information, see  Using Tagging.
    ///
    /// Parameters:
    ///   - resourceARN: The ARN of the application for which to retrieve tags.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceARN: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceARN: resourceARN
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Reverts the application to the previous running version. You can roll back an application if you suspect it is stuck in a transient status or in the running status.  You can roll back an application only if it is in the UPDATING, AUTOSCALING, or  RUNNING statuses. When you rollback an application, it loads state data from the last successful snapshot. If the application has no snapshots, Managed Service for Apache Flink rejects the rollback request.
    @Sendable
    @inlinable
    public func rollbackApplication(_ input: RollbackApplicationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> RollbackApplicationResponse {
        try await self.client.execute(
            operation: "RollbackApplication", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Reverts the application to the previous running version. You can roll back an application if you suspect it is stuck in a transient status or in the running status.  You can roll back an application only if it is in the UPDATING, AUTOSCALING, or  RUNNING statuses. When you rollback an application, it loads state data from the last successful snapshot. If the application has no snapshots, Managed Service for Apache Flink rejects the rollback request.
    ///
    /// Parameters:
    ///   - applicationName: The name of the application.
    ///   - currentApplicationVersionId: The current application version ID. You can retrieve the application version ID using  DescribeApplication.
    ///   - logger: Logger use during operation
    @inlinable
    public func rollbackApplication(
        applicationName: String,
        currentApplicationVersionId: Int64,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> RollbackApplicationResponse {
        let input = RollbackApplicationRequest(
            applicationName: applicationName, 
            currentApplicationVersionId: currentApplicationVersionId
        )
        return try await self.rollbackApplication(input, logger: logger)
    }

    /// Starts the specified Managed Service for Apache Flink application. After creating an application, you must exclusively call this operation to  start your application.
    @Sendable
    @inlinable
    public func startApplication(_ input: StartApplicationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartApplicationResponse {
        try await self.client.execute(
            operation: "StartApplication", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Starts the specified Managed Service for Apache Flink application. After creating an application, you must exclusively call this operation to  start your application.
    ///
    /// Parameters:
    ///   - applicationName: The name of the application.
    ///   - runConfiguration: Identifies the run configuration (start parameters) of a Managed Service for Apache Flink application.
    ///   - logger: Logger use during operation
    @inlinable
    public func startApplication(
        applicationName: String,
        runConfiguration: RunConfiguration? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartApplicationResponse {
        let input = StartApplicationRequest(
            applicationName: applicationName, 
            runConfiguration: runConfiguration
        )
        return try await self.startApplication(input, logger: logger)
    }

    /// Stops the application from processing data. You can stop an application only if it is in the running status, unless you set the Force  parameter to true. You can use the DescribeApplication operation to find the application status.  Managed Service for Apache Flink takes a snapshot when the application is stopped, unless Force is set  to true.
    @Sendable
    @inlinable
    public func stopApplication(_ input: StopApplicationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StopApplicationResponse {
        try await self.client.execute(
            operation: "StopApplication", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Stops the application from processing data. You can stop an application only if it is in the running status, unless you set the Force  parameter to true. You can use the DescribeApplication operation to find the application status.  Managed Service for Apache Flink takes a snapshot when the application is stopped, unless Force is set  to true.
    ///
    /// Parameters:
    ///   - applicationName: The name of the running application to stop.
    ///   - force: Set to true to force the application to stop. If you set Force to true, Managed Service for Apache Flink stops the application without taking a snapshot.    Force-stopping your application may lead to data loss or duplication. To prevent data loss or duplicate processing of data during application restarts,  we recommend you to take frequent snapshots of your application.  You can only force stop a Managed Service for Apache Flink application. You can't force stop a SQL-based Kinesis Data Analytics application. The application must be in the STARTING, UPDATING, STOPPING, AUTOSCALING, or RUNNING status.
    ///   - logger: Logger use during operation
    @inlinable
    public func stopApplication(
        applicationName: String,
        force: Bool? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StopApplicationResponse {
        let input = StopApplicationRequest(
            applicationName: applicationName, 
            force: force
        )
        return try await self.stopApplication(input, logger: logger)
    }

    /// Adds one or more key-value tags to a Managed Service for Apache Flink application. Note that the maximum number of application  tags includes system tags. The maximum number of user-defined application tags is 50. For more information, see Using Tagging.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds one or more key-value tags to a Managed Service for Apache Flink application. Note that the maximum number of application  tags includes system tags. The maximum number of user-defined application tags is 50. For more information, see Using Tagging.
    ///
    /// Parameters:
    ///   - resourceARN: The ARN of the application to assign the tags.
    ///   - tags: The key-value tags to assign to the application.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceARN: String,
        tags: [Tag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceARN: resourceARN, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes one or more tags from a Managed Service for Apache Flink application. For more information, see  Using Tagging.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes one or more tags from a Managed Service for Apache Flink application. For more information, see  Using Tagging.
    ///
    /// Parameters:
    ///   - resourceARN: The ARN of the Managed Service for Apache Flink application from which to remove the tags.
    ///   - tagKeys: A list of keys of tags to remove from the specified application.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceARN: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceARN: resourceARN, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates an existing Managed Service for Apache Flink application. Using this operation, you can update application code, input configuration, and output configuration.  Managed Service for Apache Flink updates the ApplicationVersionId each time you update your application.
    @Sendable
    @inlinable
    public func updateApplication(_ input: UpdateApplicationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateApplicationResponse {
        try await self.client.execute(
            operation: "UpdateApplication", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates an existing Managed Service for Apache Flink application. Using this operation, you can update application code, input configuration, and output configuration.  Managed Service for Apache Flink updates the ApplicationVersionId each time you update your application.
    ///
    /// Parameters:
    ///   - applicationConfigurationUpdate: Describes application configuration updates.
    ///   - applicationName: The name of the application to update.
    ///   - cloudWatchLoggingOptionUpdates: Describes application Amazon CloudWatch logging option updates. You can only update existing CloudWatch logging options with this action. To add a new CloudWatch logging option, use AddApplicationCloudWatchLoggingOption.
    ///   - conditionalToken: A value you use to implement strong concurrency for application updates. You must provide the CurrentApplicationVersionId or the ConditionalToken. You get the application's current ConditionalToken using DescribeApplication. For better concurrency support, use the ConditionalToken parameter instead of CurrentApplicationVersionId.
    ///   - currentApplicationVersionId: The current application version ID. You must provide the CurrentApplicationVersionId or the ConditionalToken.You can retrieve the application version ID using DescribeApplication. For better concurrency support, use the ConditionalToken parameter instead of CurrentApplicationVersionId.
    ///   - runConfigurationUpdate: Describes updates to the application's starting parameters.
    ///   - runtimeEnvironmentUpdate: Updates the Managed Service for Apache Flink runtime environment used to run your code. To avoid issues you must:   Ensure your new jar and dependencies are compatible with the new runtime selected.   Ensure your new code's state is compatible with the snapshot from which your application will start
    ///   - serviceExecutionRoleUpdate: Describes updates to the service execution role.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateApplication(
        applicationConfigurationUpdate: ApplicationConfigurationUpdate? = nil,
        applicationName: String,
        cloudWatchLoggingOptionUpdates: [CloudWatchLoggingOptionUpdate]? = nil,
        conditionalToken: String? = nil,
        currentApplicationVersionId: Int64? = nil,
        runConfigurationUpdate: RunConfigurationUpdate? = nil,
        runtimeEnvironmentUpdate: RuntimeEnvironment? = nil,
        serviceExecutionRoleUpdate: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateApplicationResponse {
        let input = UpdateApplicationRequest(
            applicationConfigurationUpdate: applicationConfigurationUpdate, 
            applicationName: applicationName, 
            cloudWatchLoggingOptionUpdates: cloudWatchLoggingOptionUpdates, 
            conditionalToken: conditionalToken, 
            currentApplicationVersionId: currentApplicationVersionId, 
            runConfigurationUpdate: runConfigurationUpdate, 
            runtimeEnvironmentUpdate: runtimeEnvironmentUpdate, 
            serviceExecutionRoleUpdate: serviceExecutionRoleUpdate
        )
        return try await self.updateApplication(input, logger: logger)
    }

    /// Updates the maintenance configuration of the Managed Service for Apache Flink application.  You can invoke this operation on an application that is in one of the two following states: READY or RUNNING. If you invoke it when the application is in a state other than these two states, it throws a ResourceInUseException. The service makes use of the updated configuration the next time it schedules maintenance for the application. If you invoke this operation after the service schedules maintenance, the service will apply the configuration update the next time it schedules maintenance for the application. This means that you might not see the maintenance configuration update applied to the maintenance process that follows a successful invocation of this operation, but to the following maintenance process instead. To see the current maintenance configuration of your application, invoke the DescribeApplication operation. For information about application maintenance, see Managed Service for Apache Flink for Apache Flink Maintenance.  This operation is supported only for Managed Service for Apache Flink.
    @Sendable
    @inlinable
    public func updateApplicationMaintenanceConfiguration(_ input: UpdateApplicationMaintenanceConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateApplicationMaintenanceConfigurationResponse {
        try await self.client.execute(
            operation: "UpdateApplicationMaintenanceConfiguration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the maintenance configuration of the Managed Service for Apache Flink application.  You can invoke this operation on an application that is in one of the two following states: READY or RUNNING. If you invoke it when the application is in a state other than these two states, it throws a ResourceInUseException. The service makes use of the updated configuration the next time it schedules maintenance for the application. If you invoke this operation after the service schedules maintenance, the service will apply the configuration update the next time it schedules maintenance for the application. This means that you might not see the maintenance configuration update applied to the maintenance process that follows a successful invocation of this operation, but to the following maintenance process instead. To see the current maintenance configuration of your application, invoke the DescribeApplication operation. For information about application maintenance, see Managed Service for Apache Flink for Apache Flink Maintenance.  This operation is supported only for Managed Service for Apache Flink.
    ///
    /// Parameters:
    ///   - applicationMaintenanceConfigurationUpdate: Describes the application maintenance configuration update.
    ///   - applicationName: The name of the application for which you want to update the maintenance configuration.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateApplicationMaintenanceConfiguration(
        applicationMaintenanceConfigurationUpdate: ApplicationMaintenanceConfigurationUpdate,
        applicationName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateApplicationMaintenanceConfigurationResponse {
        let input = UpdateApplicationMaintenanceConfigurationRequest(
            applicationMaintenanceConfigurationUpdate: applicationMaintenanceConfigurationUpdate, 
            applicationName: applicationName
        )
        return try await self.updateApplicationMaintenanceConfiguration(input, logger: logger)
    }
}

extension KinesisAnalyticsV2 {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: KinesisAnalyticsV2, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension KinesisAnalyticsV2 {
    /// Return PaginatorSequence for operation ``listApplicationOperations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listApplicationOperationsPaginator(
        _ input: ListApplicationOperationsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListApplicationOperationsRequest, ListApplicationOperationsResponse> {
        return .init(
            input: input,
            command: self.listApplicationOperations,
            inputKey: \ListApplicationOperationsRequest.nextToken,
            outputKey: \ListApplicationOperationsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listApplicationOperations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - applicationName: 
    ///   - limit: 
    ///   - operation: 
    ///   - operationStatus: 
    ///   - logger: Logger used for logging
    @inlinable
    public func listApplicationOperationsPaginator(
        applicationName: String,
        limit: Int? = nil,
        operation: String? = nil,
        operationStatus: OperationStatus? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListApplicationOperationsRequest, ListApplicationOperationsResponse> {
        let input = ListApplicationOperationsRequest(
            applicationName: applicationName, 
            limit: limit, 
            operation: operation, 
            operationStatus: operationStatus
        )
        return self.listApplicationOperationsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listApplicationSnapshots(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listApplicationSnapshotsPaginator(
        _ input: ListApplicationSnapshotsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListApplicationSnapshotsRequest, ListApplicationSnapshotsResponse> {
        return .init(
            input: input,
            command: self.listApplicationSnapshots,
            inputKey: \ListApplicationSnapshotsRequest.nextToken,
            outputKey: \ListApplicationSnapshotsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listApplicationSnapshots(_:logger:)``.
    ///
    /// - Parameters:
    ///   - applicationName: The name of an existing application.
    ///   - limit: The maximum number of application snapshots to list.
    ///   - logger: Logger used for logging
    @inlinable
    public func listApplicationSnapshotsPaginator(
        applicationName: String,
        limit: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListApplicationSnapshotsRequest, ListApplicationSnapshotsResponse> {
        let input = ListApplicationSnapshotsRequest(
            applicationName: applicationName, 
            limit: limit
        )
        return self.listApplicationSnapshotsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listApplicationVersions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listApplicationVersionsPaginator(
        _ input: ListApplicationVersionsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListApplicationVersionsRequest, ListApplicationVersionsResponse> {
        return .init(
            input: input,
            command: self.listApplicationVersions,
            inputKey: \ListApplicationVersionsRequest.nextToken,
            outputKey: \ListApplicationVersionsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listApplicationVersions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - applicationName: The name of the application for which you want to list all versions.
    ///   - limit: The maximum number of versions to list in this invocation of the operation.
    ///   - logger: Logger used for logging
    @inlinable
    public func listApplicationVersionsPaginator(
        applicationName: String,
        limit: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListApplicationVersionsRequest, ListApplicationVersionsResponse> {
        let input = ListApplicationVersionsRequest(
            applicationName: applicationName, 
            limit: limit
        )
        return self.listApplicationVersionsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listApplications(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listApplicationsPaginator(
        _ input: ListApplicationsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListApplicationsRequest, ListApplicationsResponse> {
        return .init(
            input: input,
            command: self.listApplications,
            inputKey: \ListApplicationsRequest.nextToken,
            outputKey: \ListApplicationsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listApplications(_:logger:)``.
    ///
    /// - Parameters:
    ///   - limit: The maximum number of applications to list.
    ///   - logger: Logger used for logging
    @inlinable
    public func listApplicationsPaginator(
        limit: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListApplicationsRequest, ListApplicationsResponse> {
        let input = ListApplicationsRequest(
            limit: limit
        )
        return self.listApplicationsPaginator(input, logger: logger)
    }
}

extension KinesisAnalyticsV2.ListApplicationOperationsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> KinesisAnalyticsV2.ListApplicationOperationsRequest {
        return .init(
            applicationName: self.applicationName,
            limit: self.limit,
            nextToken: token,
            operation: self.operation,
            operationStatus: self.operationStatus
        )
    }
}

extension KinesisAnalyticsV2.ListApplicationSnapshotsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> KinesisAnalyticsV2.ListApplicationSnapshotsRequest {
        return .init(
            applicationName: self.applicationName,
            limit: self.limit,
            nextToken: token
        )
    }
}

extension KinesisAnalyticsV2.ListApplicationVersionsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> KinesisAnalyticsV2.ListApplicationVersionsRequest {
        return .init(
            applicationName: self.applicationName,
            limit: self.limit,
            nextToken: token
        )
    }
}

extension KinesisAnalyticsV2.ListApplicationsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> KinesisAnalyticsV2.ListApplicationsRequest {
        return .init(
            limit: self.limit,
            nextToken: token
        )
    }
}
